﻿@model ViewModels.Career.NeedHelpModel

<form method="post" zyf-career-submit>
    <div class="row">
        <div class="col-md-6">
            <div class="form-group">
                <div class="form-check form-check-inline">
                    <label class="form-check-label">职业：</label>
                </div>
                <div class="form-check form-check-inline">
                    <input class="form-check-input" type="radio" asp-for="Offer" value="true" id="offerRadio">
                    <label class="form-check-label">探索</label>
                </div>
                <div class="form-check form-check-inline">
                    <input class="form-check-input" type="radio" asp-for="Offer" value="false" id="needHelpRadio">
                    <label class="form-check-label">体验</label>
                </div>
                <span asp-validation-for="Offer" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label>职业：</label>
                <input type="text" class="form-control" placeholder="关键字，空格分割" asp-for="KeyWords" />
                <span asp-validation-for="KeyWords" class="text-danger"></span>
            </div>
            <partial name="../Shared/_KCScript" />
            <div class="form-group">
                <label>城市：（可多地）</label>
                <div class="form-row">
                    <div class="col">
                        <div class="input-group">
                            <input type="text" class="form-control" placeholder="重庆" asp-for="Province">
                            <div class="input-group-append">
                                <span class="input-group-text">省</span>
                            </div>
                        </div>
                        <span asp-validation-for="Province" class="text-danger"></span>
                    </div>
                    <div class="col">
                        <div class="input-group">
                            <input type="text" class="form-control" placeholder="沙坪坝" asp-for="City">
                            <div class="input-group-append">
                                <span class="input-group-text">市</span>
                            </div>
                        </div>
                        <span asp-validation-for="City" class="text-danger"></span>
                    </div>
                    <div class="col">
                        <button class="btn btn-block btn-secondary" type="button">添加</button>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label>体验时间：</label>
                <div class="input-group">
                    <div class="input-group-prepend">
                        <span class="input-group-text">从：</span>
                    </div>
                    <input type="text" class="form-control datepicker" asp-for="From" autocomplete="off">
                </div>
                <span asp-validation-for="From" class="text-danger"></span>
                <div class="input-group">
                    <div class="input-group-prepend">
                        <span class="input-group-text ">到：</span>
                    </div>
                    <input type="text" class="form-control datepicker" asp-for="To" autocomplete="off">
                </div>
                <span asp-validation-for="To" class="text-danger"></span>
            </div>
            <div class="form-group">
                <div class="form-check form-check-inline">
                    <label class="form-check-label">性别：</label>
                </div>
                <div class="form-check form-check-inline">
                    <input class="form-check-input" type="radio" asp-for="Gender" value="true" id="maleRadio">
                    <label class="form-check-label">男</label>
                </div>
                <div class="form-check form-check-inline">
                    <input class="form-check-input" type="radio" asp-for="Gender" value="false" id="femaleRadio">
                    <label class="form-check-label">女</label>
                </div>
                <span asp-validation-for="Gender" class="text-danger"></span>
            </div>
            <div class="form-group">
                <div class="input-group">
                    <div class="input-group-prepend">
                        <span class="input-group-text">生于</span>
                    </div>
                    <input type="text" class="form-control" placeholder="比如：1998" asp-for="BirthYear" autocomplete="off">
                    <div class="input-group-append">
                        <span class="input-group-text">年</span>
                    </div>
                </div>
                <span asp-validation-for="BirthYear" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label>补充说明：</label>
                <textarea class="form-control" placeholder="比如你的专业、爱好，关于职业的看法……" asp-for="Description"></textarea>
            </div>
            <hr />
            <button class="btn-primary btn" type="submit">提交</button>
        </div>
    </div>
</form>

@section Scripts{
        <script>
            $(function () {
                        $('[zyf-career-submit]').submit(function (event) {
                    formSubmit(event, {
                        url: '/api/Career/NeedHelp',
                        success: function (data) {
                            location.reload();
                        }
                    })
                })
            })

            $(document).ready(function () {
                $('.datepicker').datepicker({
                    language: "zh-CN",
                    startDate: "@DateTime.Now",
                });
            });

        </script>
}
